class Network < ActiveRecord::Base
  belongs_to :user
  has_many :nodes
  
  def self.get_network_privacy(id)
   	if Network.find_by_id(id).is_private?
   		@privacy = "private"
   	else
		@privacy = 'public'
	end
  end
  
  def self.get_network_privacy_image(id)
   	if Network.find_by_id(id).is_private?
		"/images/ico/32x32/lock.png"
   	else
		"/images/ico/32x32/unlock.png"
	end
  end
 
end
